import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';
import nodejs from '@feidao/web/atom/nodejs/msg-b/nodejs';
import server_render from '../atom/server-render';




export default async function a002(fd: IFeidaoAiNodejsComponent, ...args: any[]) {

	const chk = document.querySelectorAll<HTMLInputElement>('[data-feidao-id=checkbox]');

	console.log('chk', chk[0]);

	const array = new Array();

	Array.from(chk).forEach((i) => {
		array.push(i.value);
	});

	console.log('array', array);

	array.forEach(async (i) => {

		const exam = new Array();

		const arrange = new Array();


		fd.data.criteria = {
			exam_id: ''
		};

		const param = {
			criteria: fd.data.criteria,
			page_size: 0,
			page_no: 1
		};
		const res_exam = await nodejs('flippedclass', 'exam_subjects_find', param);
		console.warn('.................. ynn ..................', res_exam);
		exam.push(res_exam.dataArray[0]);

		// const res_arrange = await nodejs('flippedclass', 'arrange_exam_room_find', param);
		// console.warn('.................. ynn ..................', res_arrange);
		// arrange.push(res_arrange.dataArray[0]);
	});
}